package com.example.demo.service.impl;

import com.example.demo.dao.DeptDao;
import com.example.demo.entity.Dept;
import com.example.demo.service.DeptService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by baidou on 2020/8/26.
 */
@Service
public class DeptServiceImp implements DeptService {
    @Autowired
    private DeptDao deptDao;
    public Dept selectByPrimaryKey(Integer deptNo) {
        Dept dept = deptDao.selectByPrimaryKey(deptNo);
        return dept;
    }

    public List<Dept> selectAll(){
        List<Dept> list = new ArrayList<>();
        list = deptDao.selectAll();
        return list;
    }
}
